package com.example.service;

import com.example.entity.Stu;
import com.example.mapper.StuMapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;

@Service
public class StuService {
    @Resource
    private StuMapper stuMapper;
    /**
     * 学生管理增删改查
     */
    public int addStudent(Stu stu) {
        return stuMapper.insert(stu);
    }
    public int updateById(Stu stu) {
        return stuMapper.updateById(stu);
    }
    public int deleteById(Long id) {
        return stuMapper.deleteById(id);
    }
    public List<Stu> getById(Long id) {
        return stuMapper.getById(id);
    }
    public List<Stu> selectAll(Stu stu) {
        return stuMapper.selectAll(stu);
    }
}
